package com.kclm.ssm.mapper;

import com.kclm.ssm.pojo.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author : lvhx
 * @Date: 2025/11/11 13:58
 * @Description:
 */
@Mapper
public interface StudentMapper {
    @Select("select * from tb_student")
    List<Student> selectAll();
    @Select("select * from tb_student where id=#{id}")
    Student selectById(Integer id);
    @Insert("insert  into  tb_student values(null,#{name},#{gender},#{age},#{birthday},#{avatarUrl})")
    int  insert(Student student);
    int  update(Student student);
    @Delete("delete from tb_student  where id=#{id}")
    int delete(Integer id);
}
